﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="communityList.aspx.cs"
    Inherits="Com.CMS263.Web.manage.ManageCommunity.communityList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>

    <script src="/manage/js/jquery-1.4.2.min.js"></script>

    <link href="/manage/css/common.css" rel="stylesheet" type="text/css" />
    <link href="/manage/css/main.css" rel="stylesheet" type="text/css" />
    <link href="/manage/css/box.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
        function del(id, obj) {
            if (confirm('删除后不可恢复')) {
                $.post("action.aspx?op=del", { id: id }, function(data) {
                    if (data == "ok") {
                        alert('删除成功');
                        $(obj.parentNode.parentNode).remove();
                    }
                })
            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div class="main">
        <div class="mainMenu">
            <div class="mainMenuList">
                <ul>
                    <li><a href="community_add.aspx"><b>添加小区</b><span></span></a></li>
                    <li class="s"><a><b>小区列表</b><span></span></a></li>
                </ul>
            </div>
        </div>
        <div class="mainContent">
            <div class="productList">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table2">
                    <tr>
                        <th width="40" class="c">
                            编号
                        </th>
                        <th class="c">
                            名称
                        </th>
                        <th class="c">
                            区域
                        </th>
                        <th class="c">
                            地址
                        </th>
                         <th class="c">
                            均价
                        </th>
                        <th class="c">
                            图片
                        </th>
                        <th class="c">
                            其他图片
                        </th>
                        <th class="c">
                            操作
                        </th>
                    </tr>
                    <% foreach (var item in clist)
                       {
                    %>
                    <tr>
                        <td class="c">
                            <%=item.Id%>
                        </td>
                        <td class="c">
                            <%=item.Name%>
                        </td>
                        <td class="c">
                            <%=item.Region%>-<%=item.Regionarea%>
                        </td>
                        <td class="c">
                           <%=item.Address %>
                        </td>
                        <td class="c">
                           <%=item.Price %>
                        </td>
                        <td class="c">
                          <img src="/artupfile/<%=item.Cover %>" style="width:70px;height:70px">
                        </td>
                        <td class="c">
                          <a href="/manage/manageimage/imagelist.aspx?type=c&mid=<%=item.Id %>">管理</a> 
                        </td>
                        <td class="c">
                            <a href="community_edit.aspx?id=<%=item.Id %>">修改</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <a style="cursor: pointer" onclick="del(<%=item.Id %>,this)">删除</a>
                        </td>
                    </tr>
                    <%} %>
                    <tr>
                        <td colspan="8">
                            <div style="float: right; margin-right: 100px">
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
